package com.officegame.db.dao;

public abstract class DAOFactory {
	
	private static MySqlDAOFactory mySqlDAOFactory;

	// List of DAO types supported by the factory
	public static final int MYSQL_DAO = 1;

	public abstract IPlayerDAO getPlayerDAO();
	public abstract ITeamDAO getTeamDAO();
	public abstract IGameDAO getGameDAO();

	public static DAOFactory getDAOFactory(int whichFactory) {

		switch (whichFactory) {
		case MYSQL_DAO:
			if (mySqlDAOFactory == null) {
				mySqlDAOFactory = new MySqlDAOFactory(); 
			}
			return mySqlDAOFactory;
		default:
			return null;
		}
	}
}
